package ru.study.thinkin.chapter9.interfaceprocessor;

import java.util.*;


public abstract class StringProcessor  implements ProcessorInt {
	public abstract String process(Object input);
	
	public static String s  = "if she weighs the same";
	
	public String name() {
		return getClass().getSimpleName();
	}
	public static void main(String[] args) {
		ApplyInt.process(new Upcase(), s);
		ApplyInt.process(new Splitter(), s);
	}
 }	
		
	
class Upcase extends StringProcessor {

	 public String process(Object input) {
		return ((String) input).toUpperCase();
	}

}

class Splitter extends StringProcessor {

	@Override
	public String process(Object input) {
		return Arrays.toString(((String)input).split(" "));		
		
	}

}
